Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Post Tags: Feature Parity for Customization #24069

Merged
merged 9 commits into from
Aug 3, 2020
Merged

Post Tags: Feature Parity for Customization #24069

merged 9 commits into from
Aug 3, 2020

Conversation

jeyip
Copy link
Contributor

@jeyip jeyip commented Jul 20, 2020

Description

This PR addresses a task in #21087 and is meant to add feature parity to FSE blocks. This adds settings (and some necessary restructuring/styles to support) text alignment and the experimental flags for color, fontSize, and lineHeight.

How has this been tested?

Tested on local docker wp-env environment.

  1. Create a post and add tags in the settings sidebar
  2. Navigate to the site editor
  3. In the template dropdown, navigate to the recently created post
  4. Add the post tags block
  5. Verify that the correct tags are applied
  6. Verify that we can modify the following for the post tags block:
  • font color
  • font size
  • line height
  • text alignment
  • link color
  • background color

Screenshots

Post Tags

Types of changes

New feature (non-breaking change which adds functionality)

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • I've updated all React Native files affected by any refactorings/renamings in this PR.

@jeyip jeyip changed the title Site Editor: Add color support to post tag block Site Editor: Feature Parity for Post Tag Block Jul 20, 2020
@jeyip jeyip changed the title Site Editor: Feature Parity for Post Tag Block Site Editor: Feature Parity for Post Tag Block (In Progress) Jul 20, 2020
@jeyip jeyip changed the title Site Editor: Feature Parity for Post Tag Block (In Progress) Post Tags: Feature Parity for Customization (In Progress) Jul 21, 2020
@jeyip jeyip changed the title Post Tags: Feature Parity for Customization (In Progress) Post Tags: Feature Parity for Customization Jul 29, 2020
@vindl
Copy link
Member

vindl commented Aug 3, 2020

@jeyip I'm guessing this one just needs to be rebased when #24082 is merged and it will be ready for review?

Copy link
Contributor

@Addison-Stavlo Addison-Stavlo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since there is currently no style hook for textAlign, we will need to ensure the proper class is added in the index.php file for this block.

Similar to:

$classes = 'wp-block-post-comments';
if ( isset( $attributes['textAlign'] ) ) {
$classes .= ' has-text-align-' . $attributes['textAlign'];
}

@jeyip jeyip changed the title Post Tags: Feature Parity for Customization Post Tags: Feature Parity for Customization [In Progress] Aug 3, 2020
@jeyip
Copy link
Contributor Author

jeyip commented Aug 3, 2020

Note:

Continuing the discussion that @Addison-Stavlo brought up here #24082 (comment), it seems like we'll need some design input about what the behavior of post tags when some tags cannot be found.

Some ideas:

  1. Notify the user that some tags couldn't load and render nothing
  2. Notify the user that some tags couldn't load and render the tags that we can find

After more consideration, we'll be handling these concerns at a later date.

Copy link
Member

@vindl vindl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM :shipit:

@jeyip jeyip changed the title Post Tags: Feature Parity for Customization [In Progress] Post Tags: Feature Parity for Customization Aug 3, 2020
@Addison-Stavlo Addison-Stavlo merged commit ef799f6 into WordPress:master Aug 3, 2020
@StefanXhunga
Copy link

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants